package com.zhhs.galaxyott.httpVolley.parser;

import org.json.JSONException;
import org.json.JSONObject;

import android.util.Log;

import com.zhhs.galaxyott.beans.PlayUrlBean;
import com.zhhs.galaxyott.httpVolley.response.BaseResponse;

/**
 * vip支付结果
 * 
 * 
 */
public class PlayUrlParser extends BaseParser<PlayUrlBean> {

    @Override
    public BaseResponse parse(String jsonString) {
        PlayUrlBean vprp = new PlayUrlBean();
        Log.i("DEBUG_D", "THIS IS PlayUrlParser:" + jsonString.toString());
        try {
            JSONObject result = new JSONObject(jsonString);
            parseMsg(result, vprp);
            // JSONObject result = json.getJSONObject("result");
            if (result.has("playFlag")) {
                vprp.setPlayFlag(result.getString("playFlag"));
            }
            if (result.has("userid")) {
                vprp.setMessage(result.getString("message"));
            }
        } catch (JSONException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return vprp;
    }

}
